home *** CD-ROM | disk | FTP | other *** search
- function alert(msg)
- {
- System.Debug.outputString(msg);
- }
-
- function getHTTPObject()
- {
- if (typeof XMLHttpRequest != 'undefined') {
- return new XMLHttpRequest();
- } else if (window.ActiveXObject) {
- return new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- return new ActiveXObject("Msxml2.XMLHTTP");
- }
- }
-
- function getCData(xmlNode)
- {
- var cdata = "";
- for (var i = 0; i < xmlNode.childNodes.length; i++)
- {
- if (xmlNode.childNodes[i].nodeType == 4)
- {
- cdata = xmlNode.childNodes[i].nodeValue;
- break;
- }
- }
- return cdata;
- }
-
- /**
- * Returns the node value of a child node.
- */
- function getChildNodeValue(xmlNode, nodeName)
- {
- for (var i = 0; i < xmlNode.childNodes.length; i++)
- {
- if (xmlNode.childNodes[i].nodeName == nodeName)
- {
- return xmlNode.childNodes[i].firstChild.nodeValue;
- }
- }
- return false;
- }
-
- /**
- * Returns the attribute value from an xml node.
- */
- function getAttributeValue(xmlNode, attrName)
- {
- for (var i = 0; i < xmlNode.attributes.length; i++)
- {
- if (xmlNode.attributes[i].name == attrName)
- {
- return xmlNode.attributes[i].value;
- }
- }
- return false;
- }
-
-
- function update_Image(id, image, state)
- {
- var objImage = document.getElementById(id);
- objImage.src = "images/" + image + "_" + state + ".png";
- }
-